<?php
/**
 * Created by PhpStorm.
 * User: Happy
 * Date: 2016/5/17 0017
 * Time: 15:45
 * 出错控制插件
 */

//记录和处理出错
abstract class log {

    public static $last_error;

    public static function errorHandler($errorNO, $errorStr, $errorFile, $errorLine, $errorContext = '', $sql = '') {
        self::$last_error['errorNO']   = $errorNO;
        self::$last_error['errorStr']  = $errorStr;
        self::$last_error['errorFile'] = $errorFile;
        self::$last_error['errorLine'] = $errorLine;
        $msg=chr(10).'[errorNO]'.$errorNO;
        $msg.=chr(10).'[errorStr]'.$errorStr;
        $msg.=chr(10).'[errorFile]'.$errorFile;
        $msg.=chr(10).'[errorLine]'.$errorLine;
        echo $msg;
    }

}



